<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改书籍章节')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-bookchapters-edit" th:object="${sysAppBookchapters}">
            <input name="deptId" th:field="*{deptId}" type="hidden">
            <div class="form-group">
				<label class="col-sm-3 control-label">书籍列表：</label>
				<div class="col-sm-8">
					<select name="bookId" class="form-control m-b" th:with="type=${@bookinfo.getInfos(1)}">
	                    <option th:each="bookinfo : ${type}" th:text="${bookinfo.bookName}" th:value="${bookinfo.id}" th:field="*{bookId}"></option>
	                </select>
				</div>
			</div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">章节名称：</label>
                <div class="col-sm-8">
                    <input name="deptName" th:field="*{deptName}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">显示顺序：</label>
                <div class="col-sm-8">
                    <input name="orderNum" th:field="*{orderNum}" class="form-control" type="number">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">作者：</label>
                <div class="col-sm-8">
                    <input name="leader" th:field="*{leader}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
				<label class="col-sm-3 control-label">部门状态：</label>
				<div class="col-sm-9">
					<label class="radio-box"> 
						<input type="radio" id="optionsRadios3" value="0" th:field="*{status}" name="status">正常
					</label> 
					<label class="radio-box"> 
						<input type="radio" id="optionsRadios4" value="1" th:field="*{status}" name="status">禁用
					</label>
				</div>
			</div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "system/bookchapters";
        $("#form-bookchapters-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-bookchapters-edit').serialize());
            }
        }
    </script>
</body>
</html>